/*
 * FloorRun_Manager.h
 *
 *  Created on: Mar 7, 2012
 *      Author: ajeffery
 */

#ifndef FLOORRUN_MANAGER_H_
#define FLOORRUN_MANAGER_H_

#include <stdint.h>
#include "defs.h"

class FloorRun_Manager {
public:
	FloorRun_Manager();
	virtual ~FloorRun_Manager();

	void operate();
	int8_t get_cur_floor();
	int8_t get_status();
	int8_t get_dir();
	int8_t get_dest();
	void set_dest(int8_t floor);
	int check_reached_dest();
	void set_dir(int8_t dir);
	int init_test_socket(int test_socket);

private:
	void open_door();
	void close_door();
	void next_floor();
	void set_cur_floor(int8_t floor);
	void set_status(int8_t status);
	void set_reached_dest();
	void send_timestamp(int event_type);



private:
	int8_t cur_floor;
	int8_t next_dest;
	int8_t cur_status;
	int8_t direction;
	int reached_dest;
	int test_sock;
};

#endif /* FLOORRUN_MANAGER_H_ */
